package com.model.demo.designmodel.strategy.pay;

public abstract class Payment {

    public abstract  String getName();

    protected abstract  double queryBalance(String uid);

    public  MsgResult pay(String uid,double payMoney){

        if(queryBalance(uid)>payMoney){
            return new MsgResult(200,"支付成功","余额充足");
        }
        return new MsgResult(500,"支付失败","余额不足");

    }
}
